<html>
  <head>
    <script>
      function appendResults(items) {
        for (var i = items.length - 1; i >= 0; i--) {
          var results = document.getElementById('results');
          results.appendChild(document.createElement('P'));
          results.appendChild(document.createTextNode(items[i].displayName));
        };
      }

      function makeRequest() {
        var request = gapi.client.plus.people.search({
          'query': 'beri'
        });
        request.execute(function(response) {
          console.log(response);
          appendResults(response.items);
        });
      }

      function load() {
        gapi.client.setApiKey('YOUR_API_KEY');
        gapi.client.load('plus', 'v1', makeRequest);
      }
    </script>
    <script src="https://apis.google.com/js/client.js?onload=load"></script>
  </head>
  <body>
    <div id="results"></div>
  </body>
</html>
